package com.cmc.cloud.cmclink.doc.vo.blnovo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.cmc.cloud.cmclink.doc.configuration.CustomLocalDateTimeSerializer;
import com.cmc.cloud.cmclink.doc.rpcservice.vo.BkpNameBaseVo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

import static com.cmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * @author 周贤
 * @date 2025/8/4
 */
@Schema(description = "管理后台 - 提单主信息 分页返回结果")
@Data
@EqualsAndHashCode()
@ToString(callSuper = true)
public class BlnoPageRespVO extends BkpNameBaseVo {
    @Schema(description = "si主表id", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelIgnore
    private Long blnoId;

    @ExcelIgnore
    @Schema(description = "订舱号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String bookingNo;

    @ExcelProperty(value = "blNo", order = 3)
    @ColumnWidth(50)
    @Schema(description = "提单号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String blNo;

    @ExcelProperty(value = "bkgVesselCode", order = 1)
    @ColumnWidth(50)
    @Schema(description = "订舱船名", requiredMode = Schema.RequiredMode.REQUIRED)
    private String bkgVesselCode;

    @ExcelProperty(value = "bkgVoyage", order = 2)
    @ColumnWidth(50)
    @Schema(description = "订舱航次", requiredMode = Schema.RequiredMode.REQUIRED)
    private String bkgVoyage;

    @ExcelProperty(value = "porCode", order = 12)
    @ColumnWidth(50)
    @Schema(description = "接货地", requiredMode = Schema.RequiredMode.REQUIRED)
    private String porCode;

    @ExcelProperty(value = "polCode", order = 13)
    @ColumnWidth(50)
    @Schema(description = "装货港", requiredMode = Schema.RequiredMode.REQUIRED)
    private String polCode;

    @ExcelProperty(value = "agreementNo", order = 17)
    @ColumnWidth(50)
    @Schema(description = "协议号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String agreementNo;

    @ExcelProperty(value = "spaceOwner", order = 15)
    @ColumnWidth(50)
    @Schema(description = "舱位代码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String spaceOwner;

    @ExcelProperty(value = "cntrOwner", order = 14)
    @ColumnWidth(50)
    @Schema(description = "箱主代码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String cntrOwner;

    @ExcelProperty(value = "signOrder", order = 9)
    @ColumnWidth(50)
    @Schema(description = "客户要求签单类型", requiredMode = Schema.RequiredMode.REQUIRED)
    private String signOrder;

    @ExcelProperty(value = "signType", order = 8)
    @ColumnWidth(50)
    @Schema(description = "实际签单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String signType;

    @ExcelProperty(value = "splitCombineType", order = 5)
    @ColumnWidth(50)
    @Schema(description = "提单拆并单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String splitCombineType;

    @ExcelProperty(value = "siStatus", order = 4)
    @ColumnWidth(50)
    @Schema(description = "始发港提单状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String siStatus;

    @Schema(description = "si更改状态")
    private String siChangeStatus;

    @ExcelProperty(value = "issuePlace", order = 11)
    @ColumnWidth(50)
    @Schema(description = "提单打印地")
    private String issuePlace;

    @ExcelProperty(value = "issueDate", order = 18)
    @ColumnWidth(50)
    @Schema(description = "签单日期")
    private LocalDate issueDate;

    @ExcelProperty(value = "transitTermIm", order = 19)
    @ColumnWidth(50)
    @Schema(description = "进口报关用中转类型")
    private String transitTermIm;

    @ExcelProperty(value = "signOrderTime", order = 10)
    @ColumnWidth(50)
    @Schema(description = "申请签单的时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime signOrderTime;

    @ExcelProperty(value = "doStatus", order = 16)
    @ColumnWidth(50)
    @Schema(description = "D/O状态", example = "2")
    private String doStatus;

    @Schema(description = "SI确认标记")
    @ExcelIgnore
    private Boolean siConfirmFlag;

    @Schema(description = "扣单标识")
    @ExcelIgnore
    private Boolean restrictionFlag;

    @ExcelIgnore
    @Schema(description = "运输条款")
    private String shippingTerm;

    @ExcelIgnore
    @Schema(description = "路径id")
    private Long routeId;

    @ExcelIgnore
    @Schema(description = "卸货港")
    private String podCode;

    @ExcelIgnore
    @Schema(description = "目的地")
    private String delCode;

    @ExcelIgnore
    @Schema(description = "目的地")
    private String datasource;

    @ExcelIgnore
    @Schema(description = "创建人")
    private String creator;

    @Schema(description = "提单锁")
    private Boolean blLockFlag;

    @Schema(description = "电子保函登记类型")
    private String elgReceive;

    @Schema(description = "正本保函登记类型")
    private String lgReceive;
}
